package com.jiulong.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class TSpecExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public TSpecExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andProductidIsNull() {
            addCriterion("productID is null");
            return (Criteria) this;
        }

        public Criteria andProductidIsNotNull() {
            addCriterion("productID is not null");
            return (Criteria) this;
        }

        public Criteria andProductidEqualTo(String value) {
            addCriterion("productID =", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidNotEqualTo(String value) {
            addCriterion("productID <>", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidGreaterThan(String value) {
            addCriterion("productID >", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidGreaterThanOrEqualTo(String value) {
            addCriterion("productID >=", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidLessThan(String value) {
            addCriterion("productID <", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidLessThanOrEqualTo(String value) {
            addCriterion("productID <=", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidLike(String value) {
            addCriterion("productID like", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidNotLike(String value) {
            addCriterion("productID not like", value, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidIn(List<String> values) {
            addCriterion("productID in", values, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidNotIn(List<String> values) {
            addCriterion("productID not in", values, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidBetween(String value1, String value2) {
            addCriterion("productID between", value1, value2, "productid");
            return (Criteria) this;
        }

        public Criteria andProductidNotBetween(String value1, String value2) {
            addCriterion("productID not between", value1, value2, "productid");
            return (Criteria) this;
        }

        public Criteria andSpeccolorIsNull() {
            addCriterion("specColor is null");
            return (Criteria) this;
        }

        public Criteria andSpeccolorIsNotNull() {
            addCriterion("specColor is not null");
            return (Criteria) this;
        }

        public Criteria andSpeccolorEqualTo(String value) {
            addCriterion("specColor =", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorNotEqualTo(String value) {
            addCriterion("specColor <>", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorGreaterThan(String value) {
            addCriterion("specColor >", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorGreaterThanOrEqualTo(String value) {
            addCriterion("specColor >=", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorLessThan(String value) {
            addCriterion("specColor <", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorLessThanOrEqualTo(String value) {
            addCriterion("specColor <=", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorLike(String value) {
            addCriterion("specColor like", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorNotLike(String value) {
            addCriterion("specColor not like", value, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorIn(List<String> values) {
            addCriterion("specColor in", values, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorNotIn(List<String> values) {
            addCriterion("specColor not in", values, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorBetween(String value1, String value2) {
            addCriterion("specColor between", value1, value2, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpeccolorNotBetween(String value1, String value2) {
            addCriterion("specColor not between", value1, value2, "speccolor");
            return (Criteria) this;
        }

        public Criteria andSpecsizeIsNull() {
            addCriterion("specSize is null");
            return (Criteria) this;
        }

        public Criteria andSpecsizeIsNotNull() {
            addCriterion("specSize is not null");
            return (Criteria) this;
        }

        public Criteria andSpecsizeEqualTo(String value) {
            addCriterion("specSize =", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeNotEqualTo(String value) {
            addCriterion("specSize <>", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeGreaterThan(String value) {
            addCriterion("specSize >", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeGreaterThanOrEqualTo(String value) {
            addCriterion("specSize >=", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeLessThan(String value) {
            addCriterion("specSize <", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeLessThanOrEqualTo(String value) {
            addCriterion("specSize <=", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeLike(String value) {
            addCriterion("specSize like", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeNotLike(String value) {
            addCriterion("specSize not like", value, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeIn(List<String> values) {
            addCriterion("specSize in", values, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeNotIn(List<String> values) {
            addCriterion("specSize not in", values, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeBetween(String value1, String value2) {
            addCriterion("specSize between", value1, value2, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecsizeNotBetween(String value1, String value2) {
            addCriterion("specSize not between", value1, value2, "specsize");
            return (Criteria) this;
        }

        public Criteria andSpecstockIsNull() {
            addCriterion("specStock is null");
            return (Criteria) this;
        }

        public Criteria andSpecstockIsNotNull() {
            addCriterion("specStock is not null");
            return (Criteria) this;
        }

        public Criteria andSpecstockEqualTo(String value) {
            addCriterion("specStock =", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockNotEqualTo(String value) {
            addCriterion("specStock <>", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockGreaterThan(String value) {
            addCriterion("specStock >", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockGreaterThanOrEqualTo(String value) {
            addCriterion("specStock >=", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockLessThan(String value) {
            addCriterion("specStock <", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockLessThanOrEqualTo(String value) {
            addCriterion("specStock <=", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockLike(String value) {
            addCriterion("specStock like", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockNotLike(String value) {
            addCriterion("specStock not like", value, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockIn(List<String> values) {
            addCriterion("specStock in", values, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockNotIn(List<String> values) {
            addCriterion("specStock not in", values, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockBetween(String value1, String value2) {
            addCriterion("specStock between", value1, value2, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecstockNotBetween(String value1, String value2) {
            addCriterion("specStock not between", value1, value2, "specstock");
            return (Criteria) this;
        }

        public Criteria andSpecpriceIsNull() {
            addCriterion("specPrice is null");
            return (Criteria) this;
        }

        public Criteria andSpecpriceIsNotNull() {
            addCriterion("specPrice is not null");
            return (Criteria) this;
        }

        public Criteria andSpecpriceEqualTo(BigDecimal value) {
            addCriterion("specPrice =", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceNotEqualTo(BigDecimal value) {
            addCriterion("specPrice <>", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceGreaterThan(BigDecimal value) {
            addCriterion("specPrice >", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("specPrice >=", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceLessThan(BigDecimal value) {
            addCriterion("specPrice <", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("specPrice <=", value, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceIn(List<BigDecimal> values) {
            addCriterion("specPrice in", values, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceNotIn(List<BigDecimal> values) {
            addCriterion("specPrice not in", values, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("specPrice between", value1, value2, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("specPrice not between", value1, value2, "specprice");
            return (Criteria) this;
        }

        public Criteria andSpecstatusIsNull() {
            addCriterion("specStatus is null");
            return (Criteria) this;
        }

        public Criteria andSpecstatusIsNotNull() {
            addCriterion("specStatus is not null");
            return (Criteria) this;
        }

        public Criteria andSpecstatusEqualTo(String value) {
            addCriterion("specStatus =", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusNotEqualTo(String value) {
            addCriterion("specStatus <>", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusGreaterThan(String value) {
            addCriterion("specStatus >", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusGreaterThanOrEqualTo(String value) {
            addCriterion("specStatus >=", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusLessThan(String value) {
            addCriterion("specStatus <", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusLessThanOrEqualTo(String value) {
            addCriterion("specStatus <=", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusLike(String value) {
            addCriterion("specStatus like", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusNotLike(String value) {
            addCriterion("specStatus not like", value, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusIn(List<String> values) {
            addCriterion("specStatus in", values, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusNotIn(List<String> values) {
            addCriterion("specStatus not in", values, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusBetween(String value1, String value2) {
            addCriterion("specStatus between", value1, value2, "specstatus");
            return (Criteria) this;
        }

        public Criteria andSpecstatusNotBetween(String value1, String value2) {
            addCriterion("specStatus not between", value1, value2, "specstatus");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}